]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
iconGrid: Exclude Lower Out of Bound in IconGridLayout getDropTarget()
authorMohamed Abdulla <mohamed.abdulla@neurallyenabled.com>
Mon, 23 Mar 2026 20:57:22 +0000 (23:57 +0300)
committerMarge Bot <marge-bot@gnome.org>
Tue, 14 Apr 2026 13:25:40 +0000 (13:25 +0000)
Exclude negative page values as well. They are possible in case of
dropping on the left-side of an app folder.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7700
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4153>

js/ui/iconGrid.js

index a67a1ee64ce26115bbae1686495ff996c82a76a4..e87225c8470cdd959884c8267f16ad536b8a3609 100644 (file)
@@ -1042,7 +1042,7 @@ export const IconGridLayout = GObject.registerClass({
             : Math.floor(x / this._pageWidth);
 
         // Out of bounds
-        if (page >= this._pages.length)
+        if (page < 0 || page >= this._pages.length)
             return [0, 0, DragLocation.INVALID];
 
         if (isRtl && this._orientation === Clutter.Orientation.HORIZONTAL)